From: Keir Fraser Date: Thu, 20 Sep 2007 15:02:22 +0000 (+0100) Subject: Fix tools/console to build on NetBSD. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14937^2~50 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=c11a94127d3fed24c60bccc0f799cb4e50583ade;p=xen.git Fix tools/console to build on NetBSD. - include headers needed to build on NetBSD - Remove unused pty.h - Initialize spty terminal before actually using it Signed-off-by: Christoph Egger --- diff --git a/tools/console/client/main.c b/tools/console/client/main.c index b7a45212a0..509e44bf91 100644 --- a/tools/console/client/main.c +++ b/tools/console/client/main.c @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include "xs.h" @@ -113,9 +113,8 @@ static void init_term(int fd, struct termios *old) { struct termios new_term; - if (tcgetattr(fd, old) == -1) { + if (tcgetattr(fd, old) == -1) return; - } new_term = *old; cfmakeraw(&new_term); @@ -289,6 +288,7 @@ int main(int argc, char **argv) err(errno, "Could not read tty from store"); } + init_term(spty, &attr); init_term(STDIN_FILENO, &attr); console_loop(spty, xs, path); restore_term(STDIN_FILENO, &attr); diff --git a/tools/console/daemon/utils.c b/tools/console/daemon/utils.c index 6697e13527..657bfa0cde 100644 --- a/tools/console/daemon/utils.c +++ b/tools/console/daemon/utils.c @@ -32,6 +32,7 @@ #include #include #include +#include #include "xenctrl.h" #include "utils.h"